<template>
  <AmisFormComponent v-if="isShow" :formContext="amisFormContextObj" />
</template>

<script lang="ts" setup>
import {AmisFormContext} from "@/components/AmisFormComponent/amisFormContext";
import AmisFormComponent from "@/components/AmisFormComponent/AmisFormComponent.vue";


defineOptions({name: 'AmisFormDetail'})

const {query} = useRoute() // 路由信息
const schema = ref()
const isShow = ref(false)

const amisFormContextObj = ref<AmisFormContext>({}) // amisForm 的 上下文数据

console.log("query",query)


/** 初始化 **/
onBeforeMount(async () => {
  console.log("onMounted...")
  amisFormContextObj.value.amisFormId = query.AmisFormDetailId;
  amisFormContextObj.value.readOnly = query.readOnly;

  isShow.value=true
})

</script>
